class FightManager{

    private constructor() {
    }

    enemy=null;

    isAttacking=false;

    isGameOver=false;

  
    private static _ins:FightManager
    static ins(){
        if(!this._ins) {
            this._ins =  new FightManager()
        } 
        return this._ins;
    }

    public async matchPlayer(){
        try
        {
            let res:any= await Pomelo.ins().request(RequestRoute.FightMatchPlayer);
            this.enemy=res.data;
             Pomelo.ins().request(RequestRoute.FightStart);
            // Pomelo.ins().on(RequestRoute.FightOnStartFight,(res)=>{
            //     console.log(res);
            // })
        }
        catch(e){
            console.error(e);
        }
  
    }
    

}